function validate(){
	var fname = document.getElementById("fname").value;
	var fnamepatt=/^[a-z]+[a-z0-9]+$/;
	if(fname.length==0){
		alert("First name should not be empty");
		document.getElementById("fname").focus();
		return false;
	}
	if(fname.length<=5 || fname.length>20){
		alert("First name should contains in between 6 to 20 characters");
		document.getElementById("fname").focus();
		return false;
	}
	if(!fname.match(fnamepatt)){
		alert("First name should start with small alpha and continue with combination of small alpha and numeric ");
		document.getElementById("fname").focus();
		return false;
	}
	var lname = document.getElementById("lname").value;
	var lnamepatt=/^[a-z]+[a-z0-9]+$/;
	if(lname.length==0){
		alert("Last name should not be empty");
		document.getElementById("lname").focus();
		return false;
	}
	if(lname.length<=1 || lname.length>20){
		alert("Last name should contains in between 6 to 20 characters");
		document.getElementById("lname").focus();
		return false;
	}
	if(!lname.match(lnamepatt)){
		alert("Last name should start with small alpha and combination of small alpha and numeric ");
		document.getElementById("lname").focus();
		return false;
	}
	var cname = document.getElementById("cname").value;
	var cnamepatt=/^[a-z]+[a-z ]+$/;
	if(!cname.match(cnamepatt)){
		alert("Company name should contains small alphabeticals ");
		document.getElementById("cname").focus();
		return false;
	}
	var emailid = document.getElementById("emailid").value;
	var emailpatt=/^[a-z]+[a-z0-9_\.]+[@]+[a-z]+[.]+[a-z\.]+$/;
	if(emailid.length==0){
		alert("Email id should not be empty");
		document.getElementById("emailid").focus();
		return false;
	}
	if(!emailid.match(emailpatt)){
		alert("email id should be small chars and combination of small letters and numerics, ex: abcd45@mail.com");
		document.getElementById("emailid").focus();
		return false;
	}
	var pnum=document.getElementById("pnum").value;
	var pnumpatt=/^[0-9]+$/;
	if(!pnum==10){
		alert("Please enter 10 digits mobile number ");
		document.getElementById("pnum").focus();
		return false;
	}
	if(!pnum.match(pnumpatt)){
		alert("Please enter 10 digits numeric mobile number ");
		document.getElementById("pnum").focus();
		return false;
	
	}
	var tarea=document.getElementById("tarea").value;
	if(tarea.length==0){
		alert("Please enter your requirement ");
		document.getElementById("tarea").focus();
		return false;
	}
}